import http from '../util/http.js';

export default {

    getCustomerList:()=>{
        return http({
            method:"get",
            url:"api/coustomer/list"
        })
    },
    getCustomerPage:(page)=>{
        return http({
            method:"get",
            url:"api/coustomer/page",
            params:page
        });
    },

    deleteCustomer: (Cid) => {
        return http({
            method: "delete",
            url: "api/coustomer/delete/" + Cid
        });
    },
    addCustomer:(obj)=>{
        return http({
            method:"post",
            url:"api/coustomer/add",
            data:obj,
            headers: {
                'Content-Type': 'application/json'
            }
        });
    },
    editCustomer:(obj)=>{
        return http({
            method:"put",
            url:"api/coustomer/update",
            data:obj,
            headers: {
                'Content-Type': 'application/json'
            }
        });
    },
}